
#include "member_BMessageBox.h"

using namespace BWE;

member_BMessageBox::member_BMessageBox(BMessageBox* messageBox)
{
	boss = messageBox;
}
member_BMessageBox::~member_BMessageBox()
{

}

const char* member_BMessageBox::buttonText(Button button)
{
	switch (button)
	{
	case BWE::Button_None:
		return "None";
	case BWE::Button_Left:
		return "Left";
	case BWE::Button_Middle:
		return "Middle";
	case BWE::Button_Right:
		return "Right";
	case BWE::Button_Ok:
		return "OK";
	case BWE::Button_Open:
		return "Open";
	case BWE::Button_Save:
		return "Save";
	case BWE::Button_Cancel:
		return "Cancel";
	case BWE::Button_Close:
		return "Close";
	case BWE::Button_Discard:
		return "Discard";
	case BWE::Button_Apply:
		return "Apply";
	case BWE::Button_Reset:
		return "Reset";
	case BWE::Button_Help:
		return "Help";
	case BWE::Button_SaveAll:
		return "SaveAll";
	case BWE::Button_Yes:
		return "Yes";
	case BWE::Button_YesToAll:
		return "YesToAll";
	case BWE::Button_No:
		return "No";
	case BWE::Button_NoToAll:
		return "NoToAll";
	case BWE::Button_Abort:
		return "Abort";
	case BWE::Button_Retry:
		return "Retry";
	case BWE::Button_Ignore:
		return "Ignore";
	default:
		return 0;
	}

}

void member_BMessageBox::procButtonClicked(BObject* object)
{
	BButton* button = dynamic_cast<BButton*>(object);
	int result = buttons(button);
	boss->done(result);
}

